More validation in ASP.NET

Validators share all the features, which can be very useful in some cases.

ValidationGroup

This feature was introduced with ASP.NET 2.0, and it makes it possible to split your form elements into groups. Generally, a validator control is always triggered on a postback, which may sometimes have problems. For example, if you have a contact form and a search field on the same page, the contact form can be triggered by the Search button, the user can be prevented from searching before filling out the contact form. You can assign a name to the validationgroup property, both the valators and the buttons (which) you want to be able to trigger verification. The attribute's value can be a number or a name, such as verification group = "contact_form"

SetFocusOnError (true | false)

This feature was also introduced with ASP.NET 2.0, and it does exactly what the name means. Set up the SetfocusAnother array to correct on one or several wallets, when the form is valid, then firstly focus on the invalid field.

Display (dynamic | none) static

This feature determines how the validation is given on your page. The default value is fixed, so that the verifier takes the required position whether or not the view is active (not active). You can put a piece of text directly behind a verifier and load the page. If you have not set the display attribute, or if you have set it to Static, you will see that the text has been moved. However, if you set it to Dynamic, the verifier will only take to any location if the verification fails and the valuer is active. This can be convenient in some cases, where you need space, legalization can take otherwise. If you set it to someone, the error message will never be displayed.